package com.tang.algorithm.listnode;

/**
 * @author tlm
 * @version 1.0
 * @date 2020/6/14 20:32
 */
public class LeetCode206 {
    public ListNode reverseList(ListNode head) {
        ListNode first = null;
        ListNode temp = head.next;
        while (temp!=null){
            ListNode next1 = temp.next;
            temp.next=first;
            first = temp;
            temp=next1;
        }
        return first;
    }
}
